<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">
    <f:view contentType="text/html">
        <h:head>
            <meta name="viewport" content="width=device-width"/>
        </h:head>
        <h:body>
            <h:form>
                <p:growl id="growlMO" showDetail="true" life="10000" autoUpdate="true"/>
                <p:tabView dynamic="true" activeIndex="#{advancedPrivilegesBean.index}" id="tabViewMo">
                    <!-- PESTAÑA DE  TABLA DE USUARIOS -->
                    <p:tab title="Seleccion de Usuario" disabled="#{advancedPrivilegesBean.disabledParent}">
                        <h:panelGrid columns="1" style="margin: 0 auto;width: 1500px">
                            <p:dataTable id="dataTableUsers" var="user" 
                                         value="#{advancedPrivilegesBean.mediumUserModel}" 
                                         paginator="true" rows="15"
                                         paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}" 
                                         rowsPerPageTemplate="5,10,15"
                                         selection="#{advancedPrivilegesBean.selectedUser}"
                                         selectionMode="single"
                                         rowKey="#{user.compositeKey}"
                                         style="text-align: center">
                                <p:column headerText="Usuario">  
                                    <h:outputText value="#{user.name}" />  
                                </p:column>
                                <p:column headerText="Servidor">  
                                    <h:outputText value="#{user.host}" />  
                                </p:column>  
                                <p:column headerText="Contrasena">  
                                    <h:outputText value="#{user.password}" />  
                                </p:column>  
                                <p:column headerText="Grant">  
                                    <h:outputText value="#{user.grant}" />  
                                </p:column>  
                            </p:dataTable>
                        </h:panelGrid>
                        <br></br>
                        <p:commandButton value="Continuar" 
                                         action="#{advancedPrivilegesBean.changeTab}" 
                                         update="tabViewMo,aaa"/>
                    </p:tab>
                    <!-- PESTAÑA DE DATOS DE USUARIO -->
                    <p:tab title="Log in Informacion" disabled="#{advancedPrivilegesBean.disabled}" >  
                        <h:panelGrid columns="2" cellpadding="10" id="hpcua"> 
                            <h:outputText value = "Nombre de Usuario"/>
                            <p:inputText id="username" value="#{changePasswordBean.user}"  />

                            <h:outputText value = "Host:"/>
                            <p:inputText id="host" value="#{changePasswordBean.host}" />

                            <h:outputText value = "Contraseña"/>
                            <p:password id = "password" value="#{changePasswordBean.password}" feedback="true"/>

                            <h:outputText value = "Ingrese su contraseña de nuevo"/>
                            <p:password  id="retypePassword" value="#{changePasswordBean.reTypePassword}"/> 
                        </h:panelGrid>  
                        <h:panelGrid columns="2" cellpadding="10" >
                            <p:commandButton value="Cambiar" 
                                             action="#{changePasswordBean.changePass()}" 
                                             update="tabViewMo"
                                             >
                                <p:confirm header="Confirmation" message="Esta Seguro de De los cambios a Realizar?" icon="ui-icon-alert" />
                            </p:commandButton>
                            <p:commandButton value="Salir" 
                                             action="#{advancedPrivilegesBean.cancel}" 
                                             update="tabViewMo"/>
                            <p:confirmDialog global="true" showEffect="fade" hideEffect="explode">  
                                <p:commandButton value="Yes" type="button" styleClass="ui-confirmdialog-yes" icon="ui-icon-check" />  
                                <p:commandButton value="No" type="button" styleClass="ui-confirmdialog-no" icon="ui-icon-close"/>       
                            </p:confirmDialog>
                        </h:panelGrid>
                    </p:tab>
                    <!-- PESTAÑA EDITAR PRIVILEGIOS GLOBALES -->
                    <p:tab title="Editar Privilegios Globales" disabled="#{advancedPrivilegesBean.disabled}">
                        <h:outputText value="Usuario seleccionado Actualmente : #{advancedPrivilegesBean.nameUser}@#{advancedPrivilegesBean.host}"/>
                        <h:panelGrid columns="4" style="margin: 0 auto; width: 1000px" id="aaa" >
                            <h:panelGrid columns="1" cellpadding="10" style="margin-left: -5px;" border="10">  
                                <h:outputText value="Data" style="color: #2480BC" />  
                                <p:selectManyCheckbox id="dataGlobal" value="#{editGlobalPrivilegesBean.selectedDataOptions}"  
                                                      layout="pageDirection">  
                                    <f:selectItem itemLabel="SELECT" itemValue="SELECT" />  
                                    <f:selectItem itemLabel="INSERT" itemValue="INSERT" />  
                                    <f:selectItem itemLabel="UPDATE" itemValue="UPDATE" />
                                    <f:selectItem itemLabel="DELETE" itemValue="DELETE" />  
                                    <f:selectItem itemLabel="FILE" itemValue="FILE" />  
                                </p:selectManyCheckbox>
                                <p:selectBooleanCheckbox value="#{editGlobalPrivilegesBean.checkData}" itemLabel="Seleccionar Todos" >
                                    <p:ajax  event="change" update="dataGlobal" listener="#{editGlobalPrivilegesBean.changeCheckData}"/>
                                </p:selectBooleanCheckbox>
                            </h:panelGrid> 
                            <h:panelGrid columns="1" cellpadding="10" style="margin: 0 auto" border="10">  
                                <h:outputText value="Structure" style="color: #2480BC" />  
                                <p:selectManyCheckbox id="structureGlobal" value="#{editGlobalPrivilegesBean.selectedStructOptions}"  
                                                      layout="pageDirection">  
                                    <f:selectItem itemLabel="CREATE" itemValue="CREATE" />  
                                    <f:selectItem itemLabel="ALTER" itemValue="ALTER" />  
                                    <f:selectItem itemLabel="INDEX" itemValue="INDEX" />
                                    <f:selectItem itemLabel="DROP" itemValue="DROP" />  
                                    <f:selectItem itemLabel="CREATE TEMPORARY TABLES" itemValue="CREATE TEMPORARY TABLES" /> 
                                    <f:selectItem itemLabel="SHOW VIEW" itemValue="SHOW VIEW" />  
                                    <f:selectItem itemLabel="CREATE ROUTINE" itemValue="CREATE ROUTINE" />  
                                    <f:selectItem itemLabel="ALTER ROUTINE" itemValue="ALTER ROUTINE" />
                                    <f:selectItem itemLabel="EXECUTE" itemValue="EXECUTE" />  
                                    <f:selectItem itemLabel="CREATE VIEW" itemValue="CREATE VIEW" /> 
                                    <f:selectItem itemLabel="EVENT" itemValue="EVENT" />  
                                    <f:selectItem itemLabel="TRIGGER" itemValue="TRIGGER" />
                                </p:selectManyCheckbox>
                                <p:selectBooleanCheckbox value="#{editGlobalPrivilegesBean.checkStructure}" itemLabel="Seleccionar Todos" >
                                    <p:ajax  event="change" update="structureGlobal" listener="#{editGlobalPrivilegesBean.changeCheckStructure()}"/>
                                </p:selectBooleanCheckbox>
                            </h:panelGrid>
                            <h:panelGrid columns="1" cellpadding="10" style="margin-right: -5px" border="10" >  
                                <h:outputText value="Administration" style="color: #2480BC"/>  
                                <p:selectManyCheckbox id="administrationGlobal" value="#{editGlobalPrivilegesBean.selectedAdminOptions}"  
                                                      layout="pageDirection">  
                                    <f:selectItem itemLabel="GRANT OPTION" itemValue="GRANT OPTION"/>  
                                    <f:selectItem itemLabel="SUPER" itemValue="SUPER" />  
                                    <f:selectItem itemLabel="PROCESS" itemValue="PROCESS" />
                                    <f:selectItem itemLabel="RELOAD" itemValue="RELOAD" />  
                                    <f:selectItem itemLabel="SHUTDOWN" itemValue="SHUTDOWN" /> 
                                    <f:selectItem itemLabel="SHOW DATABASES" itemValue="SHOW DATABASES" />  
                                    <f:selectItem itemLabel="LOCK TABLES" itemValue="LOCK TABLES" />  
                                    <f:selectItem itemLabel="REFERENCES" itemValue="REFERENCES" />
                                    <f:selectItem itemLabel="REPLICATION CLIENT" itemValue="REPLICATION CLIENT" />  
                                    <f:selectItem itemLabel="REPLICATION SLAVE" itemValue="REPLICATION SLAVE" /> 
                                    <f:selectItem itemLabel="CREATE USER" itemValue="CREATE USER" />  
                                </p:selectManyCheckbox>
                                <p:selectBooleanCheckbox value="#{editGlobalPrivilegesBean.checkAdmin}" itemLabel="Seleccionar Todos" >
                                    <p:ajax  event="change" update="administrationGlobal" listener="#{editGlobalPrivilegesBean.changeCheckAdmin}"/>
                                </p:selectBooleanCheckbox>
                            </h:panelGrid> 
                            <h:panelGrid columns="2" cellpadding="10" style="margin: 0 auto">  
                                <h:outputText value="MAX QUERIES PER HOUR"/>
                                <h:inputText value="#{editGlobalPrivilegesBean.maxQueriesPerHour}" style="width: 30px;"/>
                                <h:outputText value="MAX UPDATES PER HOUR"/>
                                <h:inputText value="#{editGlobalPrivilegesBean.maxUpdatesPerHour}" style="width: 30px;"/>
                                <h:outputText value="MAX CONNECTIONS PER HOUR"/>
                                <h:inputText value="#{editGlobalPrivilegesBean.maxConnectionsPerHour}" style="width: 30px;"/>
                                <h:outputText value="MAX USER_CONNECTIONS"/>
                                <h:inputText value="#{editGlobalPrivilegesBean.maxUserConnections}" style="width: 30px;"/>
                            </h:panelGrid>
                        </h:panelGrid>
                        <h:panelGrid columns="4" cellpadding="10" style="margin: 0 auto">

                            <p:commandButton value="Cambiar Privilegios a los Seleccionados" 
                                             action="#{editGlobalPrivilegesBean.changePrivileges}"
                                             update="tabViewMo">
                                <p:confirm header="Confirmation" message="Esta Seguro de Agregar los permisos Seleccionados?" icon="ui-icon-alert" />
                            </p:commandButton>
                            <p:commandButton value="Salir" 
                                             action="#{advancedPrivilegesBean.cancel}" 
                                             update="tabViewMo"/>
                            <p:confirmDialog global="true" showEffect="fade" hideEffect="explode">  
                                <p:commandButton value="Yes" type="button" styleClass="ui-confirmdialog-yes" icon="ui-icon-check" />  
                                <p:commandButton value="No" type="button" styleClass="ui-confirmdialog-no" icon="ui-icon-close"/>       
                            </p:confirmDialog>
                        </h:panelGrid>
                    </p:tab>
                    <!-- PESTAÑA PRIVILEGIOS POR SCHEMA -->
                    <p:tab title="Privilegios por Schema" disabled="#{advancedPrivilegesBean.disabled}" id="privilegesSch">
                        <h:outputText value="Usuario seleccionado Actualmente : #{advancedPrivilegesBean.nameUser}@#{advancedPrivilegesBean.host}"/>
                        <h:panelGrid columns="2" cellpadding="10"> 
                            <p:outputLabel value="Seleccione un schema"/>
                            <p:selectOneMenu value="#{advancedPrivilegesBean.selectedSchema}" style="width: 250px;" id="PTables">
                                <f:selectItem itemLabel=" " itemValue=" "/>
                                <p:ajax listener="#{advancedPrivilegesBean.reloadTables()}" update="dataSchema,structureSchema,administrationSchema"/>
                                <f:selectItems value="#{advancedPrivilegesBean.schemas}" var="schema" itemLabel="#{schema.name}" itemValue="#{schema.name}"/>  
                            </p:selectOneMenu>
                        </h:panelGrid> 
                        <h:panelGrid columns="3" style="margin: 0 auto; width: 1000px" >
                            <h:panelGrid columns="1" cellpadding="10" style="margin-left: -5px;" border="10">  
                                <h:outputText value="Data" style="color: #2480BC" />  
                                <p:selectManyCheckbox id="dataSchema" value="#{advancedPrivilegesBean.selectedDataOptionsSchema}"  
                                                      layout="pageDirection">  
                                    <f:selectItem itemLabel="SELECT" itemValue="SELECT" />  
                                    <f:selectItem itemLabel="INSERT" itemValue="INSERT" />  
                                    <f:selectItem itemLabel="UPDATE" itemValue="UPDATE" />
                                    <f:selectItem itemLabel="DELETE" itemValue="DELETE" />   
                                </p:selectManyCheckbox>
                            </h:panelGrid> 
                            <h:panelGrid columns="1" cellpadding="10" style="margin: 0 auto" border="10">  
                                <h:outputText value="Structure" style="color: #2480BC" />  
                                <p:selectManyCheckbox id="structureSchema" value="#{advancedPrivilegesBean.selectedStructureOptionsSchema}"  
                                                      layout="pageDirection">  
                                    <f:selectItem itemLabel="CREATE" itemValue="CREATE" />  
                                    <f:selectItem itemLabel="ALTER" itemValue="ALTER" />  
                                    <f:selectItem itemLabel="INDEX" itemValue="INDEX" />
                                    <f:selectItem itemLabel="DROP" itemValue="DROP" />  
                                    <f:selectItem itemLabel="CREATE TEMPORARY TABLES" itemValue="CREATE TEMPORARY TABLES" /> 
                                    <f:selectItem itemLabel="SHOW VIEW" itemValue="SHOW VIEW" />  
                                    <f:selectItem itemLabel="CREATE ROUTINE" itemValue="CREATE ROUTINE" />  
                                    <f:selectItem itemLabel="ALTER ROUTINE" itemValue="ALTER ROUTINE" />
                                    <f:selectItem itemLabel="EXECUTE" itemValue="EXECUTE" />  
                                    <f:selectItem itemLabel="CREATE VIEW" itemValue="CREATE VIEW" /> 
                                    <f:selectItem itemLabel="EVENT" itemValue="EVENT" />  
                                    <f:selectItem itemLabel="TRIGGER" itemValue="TRIGGER" />
                                </p:selectManyCheckbox>
                            </h:panelGrid>
                            <h:panelGrid columns="1" cellpadding="10" style="margin-right: -5px" border="10" >  
                                <h:outputText value="Administration " style="color: #2480BC"/>  
                                <p:selectManyCheckbox id="administrationSchema" value="#{advancedPrivilegesBean.selectedAdministrationOptionsSchema}"  
                                                      layout="pageDirection">  
                                    <f:selectItem itemLabel="GRANT" itemValue="GRANT OPTION" />   
                                    <f:selectItem itemLabel="LOCK TABLES" itemValue="LOCK TABLES" />  
                                    <f:selectItem itemLabel="REFERENCES" itemValue="REFERENCES" />
                                </p:selectManyCheckbox>
                            </h:panelGrid> 
                        </h:panelGrid>
                        <h:panelGrid columns="4" cellpadding="10" style="margin: 0 auto">
                            <p:commandButton value="Agregar Privilegios Seleccionados" 
                                             action="#{advancedPrivilegesBean.addPrivileges}" 
                                             update="privilegesSchemas,dataSchema,administrationSchema,structureSchema">
                                <p:confirm header="Confirmation" message="Esta Seguro de AGREGAR LOS PERMISOS SELCECCIONADOS DEL SCHEMA SELECCIONADO?" icon="ui-icon-alert" />
                            </p:commandButton>
                            <p:commandButton value="Agregar Todos los Privilegios" 
                                             action="#{advancedPrivilegesBean.addAllPrivileges}" 
                                             update="privilegesSchemas,dataSchema,administrationSchema,structureSchema">
                                <p:confirm header="Confirmation" message="Esta Seguro de AGREGAR TODOS LOS PRIVILEGIOS DEL SCHEMA SELECCIONADO?" icon="ui-icon-alert" />
                            </p:commandButton>
                            <p:commandButton value="Remover Todos los Privilegios" 
                                             action="#{advancedPrivilegesBean.quitAllPrivileges}" 
                                             update="privilegesSchemas,dataSchema,administrationSchema,structureSchema">
                                <p:confirm header="Confirmation" message="Esta Seguro de REMOVER TODOS LOS PRIVILEGIOS DEL SCHEMA SELECCIONADO?" icon="ui-icon-alert" />
                            </p:commandButton>
                            <p:commandButton value="Salir" 
                                             action="#{advancedPrivilegesBean.cancel}" 
                                             update="tabViewMo">
                            </p:commandButton>
                            <p:confirmDialog global="true" showEffect="fade" hideEffect="explode">  
                                <p:commandButton value="Yes" type="button" styleClass="ui-confirmdialog-yes" icon="ui-icon-check" />  
                                <p:commandButton value="No" type="button" styleClass="ui-confirmdialog-no" icon="ui-icon-close"/>       
                            </p:confirmDialog>
                        </h:panelGrid>
                        <h:panelGrid style="margin: 0 auto">
                            <br></br>
                            <br></br>
                            <p:outputLabel value="TABLA DE SCHEMAS CON SUS RESPECTIVOS PERMISOS" style="color: #2480BC;"/>
                        </h:panelGrid>
                        <h:panelGrid columns="1" cellpadding="10" style="margin: 0 auto">
                            <p:dataTable id="privilegesSchemas" value="#{advancedPrivilegesBean.schemasPrivileges}" var="sp">
                                <p:column headerText="Schema">
                                    #{sp.schemaName}
                                </p:column>
                                <p:column headerText="Privilegios">
                                    #{sp.schemaPrivileges}
                                </p:column>
                            </p:dataTable>
                        </h:panelGrid>
                    </p:tab>
                    <!-- PESTAÑA PRIVILEGIOS POR TABLA -->
                    <p:tab title="Privilegios por Tabla" disabled="#{advancedPrivilegesBean.disabled}" id="tab4">
                        <h:outputText value="Usuario seleccionado Actualmente : #{advancedPrivilegesBean.nameUser}@#{advancedPrivilegesBean.host}"/>
                        <h:panelGrid columns="4" cellpadding="10"> 
                            <p:outputLabel value="Seleccione un schema"/>
                            <p:selectOneMenu value="#{columnPrivilegesBean.selectedSchema}" style="width: 250px;" id="PTablesColumns">
                                <f:selectItem itemLabel="Select Schema" itemValue=""/>
                                <p:ajax listener="#{columnPrivilegesBean.reloadColumns}" update="PTa,selectedColPri,insertColPri,updateColPri,referencesColPri,structureTables"/>
                                <f:selectItems value="#{columnPrivilegesBean.schemas}" var="schema" itemLabel="#{schema.name}" itemValue="#{schema.name}"/> 
                            </p:selectOneMenu>
                            <p:outputLabel value="Seleccione una tabla"/>
                            <p:selectOneMenu value="#{columnPrivilegesBean.selectedTable}" style="width: 250px;" id="PTa">
                                <f:selectItem itemLabel="Select Table" itemValue=""/>
                                <p:ajax listener="#{columnPrivilegesBean.reloadTables()}" update="selectedColPri,insertColPri,updateColPri,referencesColPri,structureTables"/>
                                <f:selectItems value="#{columnPrivilegesBean.tables}" var="table2" itemLabel="#{table2}" itemValue="#{table2}"/>
                            </p:selectOneMenu>
                        </h:panelGrid>
                        <!-- PESTAÑA PRIVILEGIOS POR TABLA - COLUMNAS -->
                        <h:panelGrid columns="10" cellpadding="10">

                            <h:outputText value="SELECT" />  
                            <h:panelGrid columns="1" id="selectedColPri">
                                <p:selectManyMenu id="select" value="#{columnPrivilegesBean.selectedOptionsSelect}" rendered="#{!columnPrivilegesBean.checkSel}">  
                                    <f:selectItems value="#{columnPrivilegesBean.selectedOptions}" var="column" itemLabel="#{column}" itemValue="#{column}"/> 
                                </p:selectManyMenu>
                                <p:selectBooleanCheckbox value="#{columnPrivilegesBean.checkSel}" itemLabel="Ningun Privilegio" >
                                    <p:ajax  event="change" update="selectedColPri" listener="#{columnPrivilegesBean.changeSel}"/>
                                </p:selectBooleanCheckbox>
                            </h:panelGrid>

                            <h:outputText value="INSERT" /> 
                            <h:panelGrid columns="1" id="insertColPri">
                                <p:selectManyMenu id="insert" value="#{columnPrivilegesBean.selectedOptionsInsert}" rendered="#{!columnPrivilegesBean.checkIns}">  
                                    <f:selectItems value="#{columnPrivilegesBean.selectedOptions}" var="column" itemLabel="#{column}" itemValue="#{column}"/> 
                                </p:selectManyMenu>
                                <p:selectBooleanCheckbox value="#{columnPrivilegesBean.checkIns}" itemLabel="Ningun Privilegio" >
                                    <p:ajax  event="change" update="insertColPri" listener="#{columnPrivilegesBean.changeIns}"/>
                                </p:selectBooleanCheckbox>
                            </h:panelGrid>

                            <h:outputText value="UPDATE" /> 
                            <h:panelGrid columns="1" id="updateColPri">
                                <p:selectManyMenu id="update" value="#{columnPrivilegesBean.selectedOptionsUpdate}" rendered="#{!columnPrivilegesBean.checkUpd}">  
                                    <f:selectItems value="#{columnPrivilegesBean.selectedOptions}" var="column" itemLabel="#{column}" itemValue="#{column}"/>  
                                </p:selectManyMenu>
                                <p:selectBooleanCheckbox value="#{columnPrivilegesBean.checkUpd}" itemLabel="Ningun Privilegio">
                                    <p:ajax event="change" update="updateColPri" listener="#{columnPrivilegesBean.changeUpd}"/>
                                </p:selectBooleanCheckbox>
                            </h:panelGrid>

                            <h:outputText value="REFERENCES" /> 
                            <h:panelGrid columns="1" id="referencesColPri">
                                <p:selectManyMenu id="references" value="#{columnPrivilegesBean.selectedOptionsReferences}" rendered="#{!columnPrivilegesBean.checkRef}">  
                                    <f:selectItems value="#{columnPrivilegesBean.selectedOptions}" var="column" itemLabel="#{column}" itemValue="#{column}"/>  
                                </p:selectManyMenu>
                                <p:selectBooleanCheckbox value="#{columnPrivilegesBean.checkRef}" itemLabel="Ningun Privilegio">
                                    <p:ajax event="change" update="referencesColPri" listener="#{columnPrivilegesBean.changeRef}"/>
                                </p:selectBooleanCheckbox>
                            </h:panelGrid>


                            <h:outputText value="Privilegios por Tabla" style="color: #2480BC" />  
                            <p:selectManyCheckbox id="structureTables" value="#{columnPrivilegesBean.selectedOptionsTables}"  
                                                  layout="pageDirection">  
                                <f:selectItem itemLabel="DELETE" itemValue="DELETE" />  
                                <f:selectItem itemLabel="CREATE" itemValue="CREATE" />  
                                <f:selectItem itemLabel="DROP" itemValue="DROP" />
                                <f:selectItem itemLabel="GRANT" itemValue="GRANT" />  
                                <f:selectItem itemLabel="INDEX" itemValue="INDEX" /> 
                                <f:selectItem itemLabel="ALTER" itemValue="ALTER" />  
                                <f:selectItem itemLabel="CREATE VIEW" itemValue="CREATE VIEW" />  
                                <f:selectItem itemLabel="SHOW VIEW" itemValue="SHOW VIEW" /> 
                                <f:selectItem itemLabel="TRIGGER" itemValue="TRIGGER" />
                            </p:selectManyCheckbox>
                        </h:panelGrid>
                        <h:panelGrid style="margin: 0 auto" columns="2"> 
                            <p:commandButton value="Modificar Privilegios" 
                                             action="#{columnPrivilegesBean.doPrivileges}"
                                             update="privilegesSchemas,dataSchema,administrationSchema,structureSchema">
                                <p:confirm header="Confirmation" message="Esta Seguro de REMOVER TODOS LOS PRIVILEGIOS DEL SCHEMA SELECCIONADO?" icon="ui-icon-alert" />
                            </p:commandButton>
                            <p:commandButton value="Salir" 
                                             action="#{advancedPrivilegesBean.cancel}" 
                                             update="tabViewMo"/>
                            <p:confirmDialog global="true" showEffect="fade" hideEffect="explode">  
                                <p:commandButton value="Yes" type="button" styleClass="ui-confirmdialog-yes" icon="ui-icon-check" />  
                                <p:commandButton value="No" type="button" styleClass="ui-confirmdialog-no" icon="ui-icon-close"/>       
                            </p:confirmDialog>
                        </h:panelGrid>
                    </p:tab> 
                </p:tabView>
            </h:form>
        </h:body>
    </f:view>
</html>
